mod deref_coercion;


struct MyString(String);

impl Drop for MyString {
    fn drop(&mut self) {
        println!("drop for MyString")
    }
}



fn main() {
    let s = MyString("hello".to_owned());

    let s = &s;
    println!("Hello, world!{}", s.0);
}


// Note: debug expects two parameters with the *same* lifetime
fn debug<'a>(a: &'a str, b: &'a str) {
    println!("a = {a:?} b = {b:?}");
}


fn main() {
    let hello: &'static str = "hello";
    {
        let world = String::from("world");
        let world = &world; // 'world has a shorter lifetime than 'static
        debug(hello, world);
    }
}
